package com.maywide.jdp.system.service;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.maywide.jdp.system.entities.Module;

/**
 * 模块管理Service接口
 * 
 * @author luoyang
 * @version 1.0
 * @since JDK1.6
 */
public interface ModuleService extends LockedService, MovedService {
	/**
	 * 新增模块
	 * 
	 * @param module
	 *            模块对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Parameter 新增后的对象
	 */
	public Module insert(Module module, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改模块
	 * 
	 * @param module
	 *            模块对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Module 修改后的对象
	 */
	public Module update(Module module, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 修改模块
	 * 
	 * @param module
	 *            模块对象
	 * @param request
	 *            HttpServletRequest对象
	 * @return Module 修改后的对象
	 */
	public Module updateApp(Module moduleVO,String appType, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;

	/**
	 * 读取模块
	 * 
	 * @param id
	 *            模块ID
	 * @param request
	 *            HttpServletRequest对象
	 * @return Module 读取的模块对象
	 */
	public Module load(String id, HttpServletRequest request,
			HttpServletResponse response, HttpSession session)
			throws Exception;
}
